package router

import (
	"github.com/gin-gonic/gin"
	"vpom_-system/controller/api"
)

type UserRouter struct {
}

func (u *UserRouter) InitUserRouter(privateRouter *gin.RouterGroup, PublicRouter *gin.RouterGroup) {
	// 登录注册路由
	userLoginRouter := PublicRouter.Group("user")
	// 登入后的用户功能路由
	userRouter := privateRouter.Group("user")

	// 加入处理器对象
	userApi := api.ApiGroupApp.UserApi
	// 路由组
	{
		userLoginRouter.POST("login", userApi.Login)
		userLoginRouter.POST("register", userApi.Register)
	}
	{
		userRouter.PUT("resetPassword", userApi.ResetPassword)
	}

}
